package com.cy;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;

@SpringBootApplication
public class springsecurity {
    public static void main(String[] args) {
        SpringApplication.run(springsecurity.class, args);
//        encodePwd();
    }

    static void encodePwd(){
        BCryptPasswordEncoder encoder=new BCryptPasswordEncoder();
        String password="123456";//明文
        String newPwd=encoder.encode("123456");
        System.out.println(newPwd);//$2a$10$87X9dRp2OAyvx71A9ypWLOQ43RgFRp8s/aBgGXENavp1dop8k9hsu
    }
}
